<%@include file="../../taglibs.jsp" %>
<stripes:layout-render name="../../layout/baseview.jsp">
    <stripes:layout-component name="head">
        <jsp:element name="meta">
            <jsp:attribute name="name">
                <c:out value="description"/>
            </jsp:attribute>
            <jsp:attribute name="content">
                <fmt:message key="page.search.title"/>
            </jsp:attribute>
        </jsp:element>
        <jsp:element name="meta">
            <jsp:attribute name="name">
                <c:out value="keywords"/>
            </jsp:attribute>
            <jsp:attribute name="content">
                <fmt:message key="page.main.keywords"/>
            </jsp:attribute>
        </jsp:element>
        <title>
            <fmt:message key="page.search.title"/>
        </title>
    </stripes:layout-component>
    <stripes:layout-component name="content">
        <stripes:form id="resumeForm" action="/search/Search.action">
            <stripes:text name="search.position"/>
            <stripes:select id="region" name="search.regionId">
                <stripes:option value="">
                    <fmt:message key="page.createresume.choose"/>
                </stripes:option>
                <stripes:options-collection collection="${actionBean.baseService.regions}"
                                            label="name"
                                            value="id"/>
            </stripes:select>
            <stripes:select name="search.searchType">
                <stripes:option value="">
                    <fmt:message key="page.createresume.choose"/>
                </stripes:option>
                <stripes:options-enumeration enum="ua.com.alus.resvac.crm.util.search.Search.Type"/>
            </stripes:select>
            <stripes:submit name="searchInResumes"/>
        </stripes:form>
        <c:choose>
            <c:when test="${!empty requestScope.actionBean.searchResult}">
                <c:forEach var="search" items="${requestScope.actionBean.searchResult}">
                    <stripes:link href="/search/Search.action?showResume=&resumeUuid=${search[0]}" class="flowlink">
                        <c:out value="${search[1]}"/> <c:out value="${search[2]}"/> <c:out value="${search[3]}"/> <c:out
                            value="${search[4]}"/>
                    </stripes:link>
                    <br/>
                </c:forEach>
            </c:when>
        </c:choose>
        <br/>
    </stripes:layout-component>
</stripes:layout-render>